home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Drag.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __DRAG__
- #define __DRAG__
-
- #ifndef __APPLEEVENTS__
- #include <AppleEvents.h>
- /* #include <Types.h> */
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- /* #include <Memory.h> */
- /* #include <OSUtils.h> */
- /* #include <Events.h> */
- /* #include <Quickdraw.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- /* #include <EPPC.h> */
- /* #include <PPCToolBox.h> */
- /* #include <AppleTalk.h> */
- /* #include <Processes.h> */
- /* #include <Files.h> */
- /* #include <SegLoad.h> */
- /* #include <Notification.h> */
- #endif
-
- #ifndef __TEXTEDIT__
- #include <TextEdit.h>
- #endif
-
- #define gestaltDragMgrAttr 'drag'
-
- #define gestaltDragMgrPresent 0
-
- #define gestaltDragMgrFloatingWind 1
-
- #define gestaltPPCDragLibPresent 2
-
- #define gestaltTEAttr 'teat'
-
- #define gestaltTEHasGetHiliteRgn 0
-
- enum {
- flavorSenderOnly = 0x00000001L,
- flavorSenderTranslated = 0x00000002L,
- flavorNotSaved = 0x00000004L,
- flavorSystemTranslated = 0x00000100L
- };
-
- typedef unsigned long FlavorFlags;
-
- enum {
- dragHasLeftSenderWindow = 0x00000001L,
- dragInsideSenderApplication = 0x00000002L,
- dragInsideSenderWindow = 0x00000004L
- };
-
- typedef unsigned long DragAttributes;
-
- #define flavorTypeHFS 'hfs '
-
- #define flavorTypePromiseHFS 'phfs'
-
- #define flavorTypeDirectory 'diry'
-
- enum {
- dragTrackingEnterHandler = 1,
- dragTrackingEnterWindow = 2,
- dragTrackingInWindow = 3,
- dragTrackingLeaveWindow = 4,
- dragTrackingLeaveHandler = 5
- };
-
- typedef short DragTrackingMessage;
-
- enum {
- dragRegionBegin = 1,
- dragRegionDraw = 2,
- dragRegionHide = 3,
- dragRegionIdle = 4,
- dragRegionEnd = 5
- };
-
- typedef short DragRegionMessage;
-
- enum {
- zoomNoAcceleration = 0,
- zoomAccelerate = 1,
- zoomDecelerate = 2
- };
-
- typedef short ZoomAcceleration;
-
- typedef unsigned long DragReference;
-
- typedef unsigned long ItemReference;
-
- typedef ResType FlavorType;
-
- enum {
- badDragRefErr = -1850,
- badDragItemErr = -1851,
- badDragFlavorErr = -1852,
- duplicateFlavorErr = -1853,
- cantGetFlavorErr = -1854,
- duplicateHandlerErr = -1855,
- handlerNotFoundErr = -1856,
- dragNotAcceptedErr = -1857
- };
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct HFSFlavor {
- OSType fileType;
- OSType fileCreator;
- unsigned short fdFlags;
- FSSpec fileSpec;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct HFSFlavor HFSFlavor;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct PromiseHFSFlavor {
- OSType fileType;
- OSType fileCreator;
- unsigned short fdFlags;
- FlavorType promisedFlavor;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct PromiseHFSFlavor PromiseHFSFlavor;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef pascal OSErr (*DragTrackingHandlerProcPtr)(DragTrackingMessage message, WindowPtr theWindow, void *handlerRefCon, DragReference theDragRef);
-
- enum {
- uppDragTrackingHandlerProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DragTrackingMessage)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(WindowPtr)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DragReference)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr DragTrackingHandlerUPP;
-
- #define CallDragTrackingHandlerProc(userRoutine, message, theWindow, handlerRefCon, theDragRef) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo, (message), (theWindow), (handlerRefCon), (theDragRef))
- #define NewDragTrackingHandlerProc(userRoutine) \
- (DragTrackingHandlerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragTrackingHandlerProcInfo, GetCurrentISA())
- #else
- typedef DragTrackingHandlerProcPtr DragTrackingHandlerUPP;
-
- #define CallDragTrackingHandlerProc(userRoutine, message, theWindow, handlerRefCon, theDragRef) \
- (*(userRoutine))((message), (theWindow), (handlerRefCon), (theDragRef))
- #define NewDragTrackingHandlerProc(userRoutine) \
- (DragTrackingHandlerUPP)(userRoutine)
- #endif
-
- typedef DragTrackingHandlerUPP DragTrackingHandler;
-
- typedef pascal OSErr (*DragReceiveHandlerProcPtr)(WindowPtr theWindow, void *handlerRefCon, DragReference theDragRef);
-
- enum {
- uppDragReceiveHandlerProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(WindowPtr)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(DragReference)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr DragReceiveHandlerUPP;
-
- #define CallDragReceiveHandlerProc(userRoutine, theWindow, handlerRefCon, theDragRef) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppDragReceiveHandlerProcInfo, (theWindow), (handlerRefCon), (theDragRef))
- #define NewDragReceiveHandlerProc(userRoutine) \
- (DragReceiveHandlerUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragReceiveHandlerProcInfo, GetCurrentISA())
- #else
- typedef DragReceiveHandlerProcPtr DragReceiveHandlerUPP;
-
- #define CallDragReceiveHandlerProc(userRoutine, theWindow, handlerRefCon, theDragRef) \
- (*(userRoutine))((theWindow), (handlerRefCon), (theDragRef))
- #define NewDragReceiveHandlerProc(userRoutine) \
- (DragReceiveHandlerUPP)(userRoutine)
- #endif
-
- typedef DragReceiveHandlerUPP DragReceiveHandler;
-
- typedef pascal OSErr (*DragSendDataProcPtr)(FlavorType theType, void *dragSendRefCon, ItemReference theItemRef, DragReference theDragRef);
-
- enum {
- uppDragSendDataProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(FlavorType)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(ItemReference)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DragReference)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr DragSendDataUPP;
-
- #define CallDragSendDataProc(userRoutine, theType, dragSendRefCon, theItemRef, theDragRef) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppDragSendDataProcInfo, (theType), (dragSendRefCon), (theItemRef), (theDragRef))
- #define NewDragSendDataProc(userRoutine) \
- (DragSendDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragSendDataProcInfo, GetCurrentISA())
- #else
- typedef DragSendDataProcPtr DragSendDataUPP;
-
- #define CallDragSendDataProc(userRoutine, theType, dragSendRefCon, theItemRef, theDragRef) \
- (*(userRoutine))((theType), (dragSendRefCon), (theItemRef), (theDragRef))
- #define NewDragSendDataProc(userRoutine) \
- (DragSendDataUPP)(userRoutine)
- #endif
-
- typedef DragSendDataUPP DragSendDataProc;
-
- typedef pascal OSErr (*DragInputProcPtr)(Point *mouse, short *modifiers, void *dragInputRefCon, DragReference theDragRef);
-
- enum {
- uppDragInputProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Point*)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short*)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DragReference)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr DragInputUPP;
-
- #define CallDragInputProc(userRoutine, mouse, modifiers, dragInputRefCon, theDragRef) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppDragInputProcInfo, (mouse), (modifiers), (dragInputRefCon), (theDragRef))
- #define NewDragInputProc(userRoutine) \
- (DragInputUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragInputProcInfo, GetCurrentISA())
- #else
- typedef DragInputProcPtr DragInputUPP;
-
- #define CallDragInputProc(userRoutine, mouse, modifiers, dragInputRefCon, theDragRef) \
- (*(userRoutine))((mouse), (modifiers), (dragInputRefCon), (theDragRef))
- #define NewDragInputProc(userRoutine) \
- (DragInputUPP)(userRoutine)
- #endif
-
- typedef DragInputUPP DragInputProc;
-
- typedef pascal OSErr (*DragDrawingProcPtr)(DragRegionMessage message, RgnHandle showRegion, Point showOrigin, RgnHandle hideRegion, Point hideOrigin, void *dragDrawingRefCon, DragReference theDragRef);
-
- enum {
- uppDragDrawingProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DragRegionMessage)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(RgnHandle)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Point)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(RgnHandle)))
- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Point)))
- | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(void*)))
- | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(DragReference)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr DragDrawingUPP;
-
- #define CallDragDrawingProc(userRoutine, message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDragRef) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppDragDrawingProcInfo, (message), (showRegion), (showOrigin), (hideRegion), (hideOrigin), (dragDrawingRefCon), (theDragRef))
- #define NewDragDrawingProc(userRoutine) \
- (DragDrawingUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDragDrawingProcInfo, GetCurrentISA())
- #else
- typedef DragDrawingProcPtr DragDrawingUPP;
-
- #define CallDragDrawingProc(userRoutine, message, showRegion, showOrigin, hideRegion, hideOrigin, dragDrawingRefCon, theDragRef) \
- (*(userRoutine))((message), (showRegion), (showOrigin), (hideRegion), (hideOrigin), (dragDrawingRefCon), (theDragRef))
- #define NewDragDrawingProc(userRoutine) \
- (DragDrawingUPP)(userRoutine)
- #endif
-
- typedef DragDrawingUPP DragDrawingProc;
-
- extern pascal OSErr InstallTrackingHandler(DragTrackingHandler trackingHandler, WindowPtr theWindow, void *handlerRefCon)
- TWOWORDINLINE(0x7001, 0xABED);
- extern pascal OSErr InstallReceiveHandler(DragReceiveHandler receiveHandler, WindowPtr theWindow, void *handlerRefCon)
- TWOWORDINLINE(0x7002, 0xABED);
- extern pascal OSErr RemoveTrackingHandler(DragTrackingHandler trackingHandler, WindowPtr theWindow)
- TWOWORDINLINE(0x7003, 0xABED);
- extern pascal OSErr RemoveReceiveHandler(DragReceiveHandler receiveHandler, WindowPtr theWindow)
- TWOWORDINLINE(0x7004, 0xABED);
- extern pascal OSErr NewDrag(DragReference *theDragRef)
- TWOWORDINLINE(0x7005, 0xABED);
- extern pascal OSErr DisposeDrag(DragReference theDragRef)
- TWOWORDINLINE(0x7006, 0xABED);
- extern pascal OSErr AddDragItemFlavor(DragReference theDragRef, ItemReference theItemRef, FlavorType theType, void *dataPtr, Size dataSize, FlavorFlags theFlags)
- TWOWORDINLINE(0x7007, 0xABED);
- extern pascal OSErr SetDragItemFlavorData(DragReference theDragRef, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, unsigned long dataOffset)
- TWOWORDINLINE(0x7009, 0xABED);
- extern pascal OSErr SetDragSendProc(DragReference theDragRef, DragSendDataProc sendProc, void *dragSendRefCon)
- TWOWORDINLINE(0x700A, 0xABED);
- extern pascal OSErr SetDragInputProc(DragReference theDragRef, DragInputProc inputProc, void *dragInputRefCon)
- TWOWORDINLINE(0x700B, 0xABED);
- extern pascal OSErr SetDragDrawingProc(DragReference theDragRef, DragDrawingProc drawingProc, void *dragDrawingRefCon)
- TWOWORDINLINE(0x700C, 0xABED);
- extern pascal OSErr TrackDrag(DragReference theDragRef, const EventRecord *theEvent, RgnHandle theRegion)
- TWOWORDINLINE(0x700D, 0xABED);
- extern pascal OSErr CountDragItems(DragReference theDragRef, unsigned short *numItems)
- TWOWORDINLINE(0x700E, 0xABED);
- extern pascal OSErr GetDragItemReferenceNumber(DragReference theDragRef, unsigned short index, ItemReference *theItemRef)
- TWOWORDINLINE(0x700F, 0xABED);
- extern pascal OSErr CountDragItemFlavors(DragReference theDragRef, ItemReference theItemRef, unsigned short *numFlavors)
- TWOWORDINLINE(0x7010, 0xABED);
- extern pascal OSErr GetFlavorType(DragReference theDragRef, ItemReference theItemRef, unsigned short index, FlavorType *theType)
- TWOWORDINLINE(0x7011, 0xABED);
- extern pascal OSErr GetFlavorFlags(DragReference theDragRef, ItemReference theItemRef, FlavorType theType, FlavorFlags *theFlags)
- TWOWORDINLINE(0x7012, 0xABED);
- extern pascal OSErr GetFlavorDataSize(DragReference theDragRef, ItemReference theItemRef, FlavorType theType, Size *dataSize)
- TWOWORDINLINE(0x7013, 0xABED);
- extern pascal OSErr GetFlavorData(DragReference theDragRef, ItemReference theItemRef, FlavorType theType, void *dataPtr, Size *dataSize, unsigned long dataOffset)
- TWOWORDINLINE(0x7014, 0xABED);
- extern pascal OSErr GetDragItemBounds(DragReference theDragRef, ItemReference theItemRef, Rect *itemBounds)
- TWOWORDINLINE(0x7015, 0xABED);
- extern pascal OSErr SetDragItemBounds(DragReference theDragRef, ItemReference theItemRef, const Rect *itemBounds)
- TWOWORDINLINE(0x7016, 0xABED);
- extern pascal OSErr GetDropLocation(DragReference theDragRef, AEDesc *dropLocation)
- TWOWORDINLINE(0x7017, 0xABED);
- extern pascal OSErr SetDropLocation(DragReference theDragRef, const AEDesc *dropLocation)
- TWOWORDINLINE(0x7018, 0xABED);
- extern pascal OSErr GetDragAttributes(DragReference theDragRef, DragAttributes *flags)
- TWOWORDINLINE(0x7019, 0xABED);
- extern pascal OSErr GetDragMouse(DragReference theDragRef, Point *mouse, Point *pinnedMouse)
- TWOWORDINLINE(0x701A, 0xABED);
- extern pascal OSErr SetDragMouse(DragReference theDragRef, Point pinnedMouse)
- TWOWORDINLINE(0x701B, 0xABED);
- extern pascal OSErr GetDragOrigin(DragReference theDragRef, Point *initialMouse)
- TWOWORDINLINE(0x701C, 0xABED);
- extern pascal OSErr GetDragModifiers(DragReference theDragRef, short *modifiers, short *mouseDownModifiers, short *mouseUpModifiers)
- TWOWORDINLINE(0x701D, 0xABED);
- extern pascal OSErr ShowDragHilite(DragReference theDragRef, RgnHandle hiliteFrame, Boolean inside)
- TWOWORDINLINE(0x701E, 0xABED);
- extern pascal OSErr HideDragHilite(DragReference theDragRef)
- TWOWORDINLINE(0x701F, 0xABED);
- extern pascal OSErr DragPreScroll(DragReference theDragRef, short dH, short dV)
- TWOWORDINLINE(0x7020, 0xABED);
- extern pascal OSErr DragPostScroll(DragReference theDragRef)
- TWOWORDINLINE(0x7021, 0xABED);
- extern pascal OSErr UpdateDragHilite(DragReference theDragRef, RgnHandle updateRgn)
- TWOWORDINLINE(0x7022, 0xABED);
- extern pascal Boolean WaitMouseMoved(Point initialMouse)
- TWOWORDINLINE(0x7023, 0xABED);
- extern pascal OSErr ZoomRects(const Rect *fromRect, const Rect *toRect, short zoomSteps, ZoomAcceleration acceleration)
- TWOWORDINLINE(0x7024, 0xABED);
- extern pascal OSErr ZoomRegion(RgnHandle region, Point zoomDistance, short zoomSteps, ZoomAcceleration acceleration)
- TWOWORDINLINE(0x7025, 0xABED);
- extern pascal OSErr TEGetHiliteRgn(RgnHandle region, TEHandle hTE)
- THREEWORDINLINE(0x3F3C, 0x000F, 0xA83D);
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-